Vue.component('cash-left',{
	data:function(){
		return {
			title:'开始',
			cashs: [{icon: 'icon-canzhuo',name: '餐桌',id: 0},
				{icon: 'icon-xiaofei',name: '收银',id: 1},
				{icon: 'icon-dingdan',name: '订单',id: 2},
				{icon: 'icon-workclock',name: '交班',id: 3},
				{icon: 'icon-huangguan',name: '会员',id: 4}
			],
		}
	},
	methods:{
		cash_nav:function(e){
			let id=e.$attrs.data_id;
			let index=Number(e.$attrs.data_index)-1;
			if(index==id){
				return false;
			}else if(id==0){
				//window.history.pushState(null, null, "/base/base/diningTable");
				location.href='/base/base/diningTable';
			}else if(id==1){
				location.href='/base/index';
			}else if(id==2){
				location.href='/base/base/order';
			}else if(id==4){
				location.href='/base/base/member';
			}else if(id==3){
				location.href='/base/base/handover';
			}

		},


	},
	template:`<el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" background-color="#545c64"\
      text-color="#fff" active-text-color="#ffd04b">\
      <el-submenu index="1">\
        <template slot="title">\
          <i class="el-icon-location"></i>\
          <span>导航一</span>\
        </template>\
        <el-menu-item-group>\
          <el-menu-item index="1-1">选项1</el-menu-item>\
          <el-menu-item index="1-2">选项2</el-menu-item>\
        </el-menu-item-group>\
        <el-menu-item-group>\
          <el-menu-item index="1-3">选项3</el-menu-item>\
        </el-menu-item-group>\
      </el-submenu>\
      <el-menu-item index="2">\
        <i class="el-icon-menu"></i>\
        <span slot="title">导航二</span>\
      </el-menu-item>\
      <el-menu-item index="3" >\
        <i class="el-icon-document"></i>\
        <span slot="title">导航三</span>\
      </el-menu-item>\
      <el-menu-item index="4">\
        <i class="el-icon-setting"></i>\
        <span slot="title">导航四</span>\
      </el-menu-item>\
    </el-menu>`
	,props: ['activeIndex1']

});
